{template 'header'}
<ul class="nav nav-tabs">
    <li class=""><a href="{php echo $this->createWeburl('signInReward');}">签到管理</a></li>
    <li class="active"><a href="{php echo $this->createWeburl('signInReward', array('op' => 'addShow'));}">添加签到奖励</a></li>
</ul>
<form action="" method="post" class="form-horizontal" id="myform" role="form" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">天数<span style="color: red">*</span>:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="days" placeholder="天数" value="{$signInReward['days']}" type="text">
            <small style="color: red"> 这个天数是1-7区间,每一天只有一条数据</small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">奖励类型</label>
        <div class="col-sm-9 col-xs-12">
            <label class="radio-inline">
                <input type="radio" name="type" value="1" {if $signInReward['type'] ==1 || $advertisement['type'] == ''} checked {/if} />金币
            </label>
            <label class="radio-inline">
                <input type="radio" name="type" value="2" {if $signInReward['type'] ==2} checked {/if}/>猫粮
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">数量:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="reward" placeholder="数量" value="{$signInReward['reward']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label"></label>
        <div class="" >
            <input type="hidden" name="op" value="{php echo $id ? 'edit' : 'add'}">
            <input type="hidden" name="id" value="{$id}">
            <input type="submit" name="submit" id="submit" value="{php echo $id ? '修改' : '新增'}" class="btn btn-primary">
        </div>
    </div>
</form>
{template 'footer'}


<script>
    $(function () {
        $("input[name='type']").click(function () {
            if ( $(this).val() ==1 || $(this).val() == 3) {
                $('#appId').hide();
                $('#url').show();
            } else if ($(this).val() == 4 ) {
                $('#appId').hide();
                $('#url').hide();
            } else {
                $('#appId').show();
            }
        });
    })


</script>